import java.lang.String;


public class ExtractNumber {

  public static void main(String[] args) {
    System.out.println(extractNumber("a6d7m84qe234aa"));
  }


  private static String extractNumber(String string) {

    StringBuilder builder = new StringBuilder();

    for (int i = 0; i < string.length(); i++) {
      char c = string.charAt(i);
      if (c > '0' && c < '9')
        builder.append(c);
    }

    return builder.toString();
  }

}
